package com.newlink.building.userinfo.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.*
import com.newlink.building.userinfo.mvp.contract.Module_UserInfo_AuthCardAddContract
import io.reactivex.Observable

/**
 * @author wangyang
 * @date 2022/9/20
 * @description 我的——关于页面的Model
 */
class Module_UserInfo_AuthCardAddModel : BaseModel(), Module_UserInfo_AuthCardAddContract.Model {

    override fun getCardList(request: LoadFaceListDataRequest): Observable<HttpResult<FaceListData>> {
        return Base_RetrofitHelper.service.getAuthKeyList(request.accessToken, AuthKeyTypeCard)
    }

    override fun removeCard(request: DeleteFaceDataRequest): Observable<HttpResult<StatusData>> {
        return Base_RetrofitHelper.service.deleteAuthKey(request.accessToken, request.data.keyId)
    }

}